"use client";
import "@/lib/globalsCSS/index.css";
import "@/lib/iconfont/iconfont.css"
import "@/lib/globalsCSS/font/index.css"
import Middleware from "@/components/middleware";
import { cn } from "./(dashboard)/common/util";
import StyledComponentsRegistry, { AntdConfigProvider } from "@/lib/globalsCSS/antd/AntdConfig";
import Progress from "@/components/layout/Progress";
import { withRedux } from "@/store/withRedux";
import Navbar from "@/components/layout/Navbar";
import Start from "./(components)/YYAnimation";
import StickyTop from "@/components/layout/StickyTop";
import { ArrowUpOutlined } from "@ant-design/icons";

function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" style={{ height: "100vh", scrollbarWidth: 'none' }}>
      <Middleware />
      <link rel="icon" href="/logo.png" type="image/svg" />
      <title>短线数据大师</title>
      <meta name="description" content="短线数据大师" />
      <body className={cn("h-full overflow-hidde")}>
        <StyledComponentsRegistry>
          <AntdConfigProvider>
            {/* <Start /> */}
            <div className="h-full">
              <div className="fixed z-[999] h-[60px] bg-[#fff] w-full">
                <Navbar />
              </div>
              <StickyTop>
                <ArrowUpOutlined className="text-[25px] font-bold" />
              </StickyTop>
              <div className="flex-1 relative overflow-auto _scroll pt-[60px]">{children}</div>
            </div>
          </AntdConfigProvider>
        </StyledComponentsRegistry>
      </body>
      <Progress />
    </html>
  );
}
export default withRedux(RootLayout); //包裹Redux
